<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>文件传输进度</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 20px;
            background-color: #f5f5f5;
            user-select: none;
        }
        .progress-container {
            background-color: #fff;
            border-radius: 8px;
            padding: 20px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        .progress-bar {
            width: 100%;
            height: 20px;
            background-color: #e0e0e0;
            border-radius: 10px;
            overflow: hidden;
            margin: 10px 0;
        }
        .progress-fill {
            height: 100%;
            background-color: #4CAF50;
            width: 0%;
            transition: width 0.3s ease;
        }
        .progress-text {
            text-align: center;
            color: #333;
            font-size: 14px;
        }
    </style>
</head>
<body>
    <div class="progress-container">
        <div class="progress-bar">
            <div class="progress-fill" id="progressFill"></div>
        </div>
        <div class="progress-text" id="progressText">正在传输文件... 0%</div>
    </div>

    <script>
        const { ipcRenderer } = require('electron');
        
        // 监听进度更新事件
        ipcRenderer.on('update-progress', (event, progress) => {
            const progressFill = document.getElementById('progressFill');
            const progressText = document.getElementById('progressText');
            
            progressFill.style.width = `${progress}%`;
            progressText.textContent = `正在传输文件... ${progress}%`;
            
            if (progress === 100) {
                progressText.textContent = '传输完成！';
            }
        });
    </script>
</body>
</html> 